/*
 * Academic License - for use in teaching, academic research, and meeting
 * course requirements at degree granting institutions only.  Not for
 * government, commercial, or other organizational use.
 *
 * mtimes.c
 *
 * Code generation for function 'mtimes'
 *
 */

/* Include files */
#include "mtimes.h"
#include "emxutil.h"
#include "types.h"
#include "rt_nonfinite.h"

/* Function Definitions */
void mtimes(const emxArray_real_T *A, const emxArray_real_T *B,
            emxArray_real_T *C)
{
  const double *A_data;
  const double *B_data;
  double *C_data;
  int boffset;
  int inner;
  int j;
  int k;
  int nc;
  B_data = B->data;
  A_data = A->data;
  inner = A->size[1];
  nc = B->size[1];
  boffset = C->size[0] * C->size[1];
  C->size[0] = 1;
  C->size[1] = B->size[1];
  emxEnsureCapacity_real_T(C, boffset);
  C_data = C->data;
  for (j = 0; j < nc; j++) {
    boffset = j * B->size[0];
    C_data[j] = 0.0;
    for (k = 0; k < inner; k++) {
      C_data[j] += A_data[k] * B_data[boffset + k];
    }
  }
}

/* End of code generation (mtimes.c) */
